package com.webchat.domain.dto.queue;

import lombok.Data;


@Data
public class ChatAccountListMessageDTO extends BaseQueueDTO {

    /**
     * 事 件：
     * @see QueueMessageActionEnum
     */
    private int action;

    private Long id;

    private String sender;

    /**
     * @see MallAccountTypeEnum
     */
    private Integer senderType;

    private String receiver;
    /**
     * @see MallAccountTypeEnum
     */
    private Integer receiverType;

    private Long time;

    public static ChatAccountListMessageDTO of(int action, Long id,
                                               String sender, Integer senderType,
                                               String receiver, Integer receiverType,
                                               Long time) {
        ChatAccountListMessageDTO message = new ChatAccountListMessageDTO();
        message.setAction(action);
        message.setId(id);
        message.setSender(sender);
        message.setReceiver(receiver);
        message.setTime(time);
        message.setSenderType(senderType);
        message.setSenderType(receiverType);
        return message;
    }
}
